package com.tanhua.server.controller;

import com.tanhua.autoconfig.vo.HuanXinUser;
import com.tanhua.server.interceptors.UserHolder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/huanxin")
@Slf4j
public class HuanxinController {

//    huanxin/user

    @GetMapping(value = "/user",name = "获取环信用户")
    public ResponseEntity queryHuanxinUser(){
        log.info("获取环信用户信息。。。。。。。。。");
//        username	string
//        password	string
        HuanXinUser huanXinUser = new HuanXinUser(UserHolder.getUserId().toString(),"123456");
        return ResponseEntity.ok(huanXinUser);

    }
}
